<template>
  <div class="special-talk">
    <div class="header">
      <h1>特色讲谈</h1>
      <p class="subtitle">探索知识与智慧的碰撞，开启思想的新视野</p>
    </div>
    <div class="content">
      <div class="section-row" v-for="(talksRow, rowIndex) in talksRows" :key="rowIndex">
        <div
            class="section"
            v-for="(talk, index) in talksRow"
            :key="index"
            :style="{ 'animation-delay': `${index * 0.1}s` }"
        >
          <div class="section-content">
            <div class="image-container">
              <el-image
                  :src="talk.image"
                  :alt="talk.title"
                  class="talk-image"
                  fit="cover"
              />
              <div class="image-overlay"></div>
            </div>
            <div class="text">
              <h2>{{ talk.title }}</h2>
              <div class="divider"></div>
              <div class="info-item">
                <span class="info-icon">🌟</span>
                <p>{{ talk.features }}</p>
              </div>
              <div class="info-item">
                <span class="info-icon">🏆</span>
                <p>{{ talk.experience }}</p>
              </div>
              <div class="info-item">
                <span class="info-icon">👥</span>
                <p>{{ talk.suitable }}</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import image15 from '../../../assets/15.jpg'
import image16 from '../../../assets/16.jpg'
import image17 from '../../../assets/17.jpg'
import image18 from '../../../assets/18.jpg'
import image19 from '../../../assets/19.jpg'

export default {
  name: 'SpecialTalk',
  data() {
    return {
      talks: [
        {
          title: '科技创新',
          image: image15,
          features: '探讨最新科技趋势，分享创新思维',
          experience: '去年成功举办了多场科技创新讲座，吸引了大量学生参与',
          suitable: '对科技感兴趣的学生和教师'
        },
        {
          title: '文化艺术',
          image: image16,
          features: '展示文化艺术的魅力，提升审美能力',
          experience: '往年的文化艺术讲座深受好评，参与人数逐年增加',
          suitable: '热爱文化艺术的学生和教师'
        },
        {
          title: '职业规划',
          image: image17,
          features: '提供职业规划指导，帮助学生明确未来方向',
          experience: '去年的职业规划讲座帮助许多学生找到了合适的职业道路',
          suitable: '即将毕业的学生和对职业规划有需求的教师'
        },
        {
          title: '心理健康',
          image: image18,
          features: '关注心理健康，提供心理辅导和支持',
          experience: '往年的心理健康讲座得到了广泛认可，帮助许多学生解决了心理问题',
          suitable: '关注心理健康的学生和教师'
        },
        {
          title: '环境保护',
          image: image19,
          features: '提高环保意识，倡导绿色生活方式',
          experience: '去年的环保讲座激发了学生的环保热情，参与度很高',
          suitable: '关心环境保护的学生和教师'
        }
      ]
    };
  },
  computed: {
    talksRows() {
      const rows = [];
      for (let i = 0; i < this.talks.length; i += 2) {
        rows.push(this.talks.slice(i, i + 2));
      }
      return rows;
    }
  }
}
</script>

<style scoped>
.special-talk {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
  padding: 40px 20px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.header {
  background: white;
  padding: 30px 40px;
  margin-bottom: 40px;
  width: 80%;
  max-width: 1000px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  text-align: center;
  transform: translateY(-20px);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

h1 {
  font-size: 2.5rem;
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-top: 10px;
  font-weight: 300;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
}

.section-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section {
  background: white;
  padding: 0;
  margin: 15px;
  width: calc(50% - 30px);
  max-width: 500px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.section-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.talk-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.section:hover .talk-image {
  transform: scale(1.05);
}

.text {
  padding: 25px;
  text-align: left;
}

.text h2 {
  font-size: 1.6rem;
  margin: 0 0 15px 0;
  color: #2c3e50;
  font-weight: 600;
}

.divider {
  height: 3px;
  width: 60px;
  background: linear-gradient(to right, #3498db, #9b59b6);
  margin: 0 0 20px 0;
  border-radius: 3px;
}

.info-item {
  display: flex;
  margin-bottom: 15px;
  align-items: flex-start;
}

.info-icon {
  font-size: 1.2rem;
  margin-right: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.text p {
  line-height: 1.6;
  margin: 0;
  color: #555;
  font-size: 0.95rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 992px) {
  .section {
    width: calc(50% - 20px);
  }
}

@media (max-width: 768px) {
  .header {
    width: 90%;
    padding: 25px;
  }

  .section {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
  }

  .section-row {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .text {
    padding: 20px;
  }

  .text h2 {
    font-size: 1.4rem;
  }
}
</style>